<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
      <!-- 每七天更换一次顺序，后面的依次往前一步，依次循环 -->

    <script>
          var arr=[1,2,3,4]
          let index=0
         setInterval(()=>{
          let num=  arr.shift(index)
          arr.push(num)
          console.log(num,'num');
          console.log(arr,'arr');
         },604800)
    console.log(arr,'arr');

    </script>
</body>
</html>